/* 
接口可以描述函数类型
*/
interface SearchFunc {
  (source: string, subString: string): boolean
}

const mySearch: SearchFunc = (x: string, y: string) => {
  return x.includes(y)
} 

console.log(mySearch('abcd', 'cb'))